/*
 *  This file is part of the SIRIUS libraries for analyzing MS and MS/MS data
 *
 *  Copyright (C) 2024 Bright Giant GmbH
 *
 *  This library is free software; you can redistribute it and/or
 *  modify it under the terms of the GNU Lesser General Public
 *  License as published by the Free Software Foundation; either
 *  version 2.1 of the License, or (at your option) any later version.
 *
 *  This library is distributed in the hope that it will be useful,
 *  but WITHOUT ANY WARRANTY; without even the implied warranty of
 *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
 *  Lesser General Public License for more details.
 *
 *  You should have received a copy of the GNU General Public License along with SIRIUS.  If not, see <http://www.gnu.org/licenses/>.
 *
 *  NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
 *  https://openapi-generator.tech
 *  Do not edit the class manually.
 */


package io.sirius.ms.sdk.model;

import java.util.Objects;
import java.util.Arrays;
import com.fasterxml.jackson.annotation.JsonInclude;
import com.fasterxml.jackson.annotation.JsonProperty;
import com.fasterxml.jackson.annotation.JsonCreator;
import com.fasterxml.jackson.annotation.JsonTypeName;
import com.fasterxml.jackson.annotation.JsonValue;
import io.sirius.ms.sdk.model.CompoundClasses;
import io.sirius.ms.sdk.model.ConsensusCriterionDeNovo;
import java.util.ArrayList;
import java.util.Arrays;
import java.util.List;
import com.fasterxml.jackson.annotation.JsonPropertyOrder;
import com.fasterxml.jackson.annotation.JsonTypeName;

/**
 * ConsensusAnnotationsDeNovo
 */
@JsonPropertyOrder({
  ConsensusAnnotationsDeNovo.JSON_PROPERTY_MOLECULAR_FORMULA,
  ConsensusAnnotationsDeNovo.JSON_PROPERTY_COMPOUND_CLASSES,
  ConsensusAnnotationsDeNovo.JSON_PROPERTY_SUPPORTING_FEATURE_IDS,
  ConsensusAnnotationsDeNovo.JSON_PROPERTY_SELECTION_CRITERION
})
@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.14.0")
public class ConsensusAnnotationsDeNovo {
  public static final String JSON_PROPERTY_MOLECULAR_FORMULA = "molecularFormula";
  @jakarta.annotation.Nullable
  private String molecularFormula;

  public static final String JSON_PROPERTY_COMPOUND_CLASSES = "compoundClasses";
  @jakarta.annotation.Nullable
  private CompoundClasses compoundClasses;

  public static final String JSON_PROPERTY_SUPPORTING_FEATURE_IDS = "supportingFeatureIds";
  @jakarta.annotation.Nullable
  private List<String> supportingFeatureIds;

  public static final String JSON_PROPERTY_SELECTION_CRITERION = "selectionCriterion";
  @jakarta.annotation.Nullable
  private ConsensusCriterionDeNovo selectionCriterion;

  public ConsensusAnnotationsDeNovo() {
  }

  public ConsensusAnnotationsDeNovo molecularFormula(@jakarta.annotation.Nullable String molecularFormula) {
    
    this.molecularFormula = molecularFormula;
    return this;
  }

  /**
   * Molecular formula of the consensus annotation  Might be null if no consensus formula is available.
   * @return molecularFormula
   */
  @jakarta.annotation.Nullable
  @JsonProperty(JSON_PROPERTY_MOLECULAR_FORMULA)
  @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)

  public String getMolecularFormula() {
    return molecularFormula;
  }


  @JsonProperty(JSON_PROPERTY_MOLECULAR_FORMULA)
  @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
  public void setMolecularFormula(@jakarta.annotation.Nullable String molecularFormula) {
    this.molecularFormula = molecularFormula;
  }

  public ConsensusAnnotationsDeNovo compoundClasses(@jakarta.annotation.Nullable CompoundClasses compoundClasses) {
    
    this.compoundClasses = compoundClasses;
    return this;
  }

  /**
   * Get compoundClasses
   * @return compoundClasses
   */
  @jakarta.annotation.Nullable
  @JsonProperty(JSON_PROPERTY_COMPOUND_CLASSES)
  @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)

  public CompoundClasses getCompoundClasses() {
    return compoundClasses;
  }


  @JsonProperty(JSON_PROPERTY_COMPOUND_CLASSES)
  @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
  public void setCompoundClasses(@jakarta.annotation.Nullable CompoundClasses compoundClasses) {
    this.compoundClasses = compoundClasses;
  }

  public ConsensusAnnotationsDeNovo supportingFeatureIds(@jakarta.annotation.Nullable List<String> supportingFeatureIds) {
    
    this.supportingFeatureIds = supportingFeatureIds;
    return this;
  }

  public ConsensusAnnotationsDeNovo addSupportingFeatureIdsItem(String supportingFeatureIdsItem) {
    if (this.supportingFeatureIds == null) {
      this.supportingFeatureIds = new ArrayList<>();
    }
    this.supportingFeatureIds.add(supportingFeatureIdsItem);
    return this;
  }

  /**
   * FeatureIds where the topAnnotation supports this annotation.
   * @return supportingFeatureIds
   */
  @jakarta.annotation.Nullable
  @JsonProperty(JSON_PROPERTY_SUPPORTING_FEATURE_IDS)
  @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)

  public List<String> getSupportingFeatureIds() {
    return supportingFeatureIds;
  }


  @JsonProperty(JSON_PROPERTY_SUPPORTING_FEATURE_IDS)
  @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
  public void setSupportingFeatureIds(@jakarta.annotation.Nullable List<String> supportingFeatureIds) {
    this.supportingFeatureIds = supportingFeatureIds;
  }

  public ConsensusAnnotationsDeNovo selectionCriterion(@jakarta.annotation.Nullable ConsensusCriterionDeNovo selectionCriterion) {
    
    this.selectionCriterion = selectionCriterion;
    return this;
  }

  /**
   * Get selectionCriterion
   * @return selectionCriterion
   */
  @jakarta.annotation.Nullable
  @JsonProperty(JSON_PROPERTY_SELECTION_CRITERION)
  @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)

  public ConsensusCriterionDeNovo getSelectionCriterion() {
    return selectionCriterion;
  }


  @JsonProperty(JSON_PROPERTY_SELECTION_CRITERION)
  @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
  public void setSelectionCriterion(@jakarta.annotation.Nullable ConsensusCriterionDeNovo selectionCriterion) {
    this.selectionCriterion = selectionCriterion;
  }


  @Override
  public boolean equals(Object o) {
    if (this == o) {
      return true;
    }
    if (o == null || getClass() != o.getClass()) {
      return false;
    }
    ConsensusAnnotationsDeNovo consensusAnnotationsDeNovo = (ConsensusAnnotationsDeNovo) o;
    return Objects.equals(this.molecularFormula, consensusAnnotationsDeNovo.molecularFormula) &&
        Objects.equals(this.compoundClasses, consensusAnnotationsDeNovo.compoundClasses) &&
        Objects.equals(this.supportingFeatureIds, consensusAnnotationsDeNovo.supportingFeatureIds) &&
        Objects.equals(this.selectionCriterion, consensusAnnotationsDeNovo.selectionCriterion);
  }

  @Override
  public int hashCode() {
    return Objects.hash(molecularFormula, compoundClasses, supportingFeatureIds, selectionCriterion);
  }

  @Override
  public String toString() {
    StringBuilder sb = new StringBuilder();
    sb.append("class ConsensusAnnotationsDeNovo {\n");
    sb.append("    molecularFormula: ").append(toIndentedString(molecularFormula)).append("\n");
    sb.append("    compoundClasses: ").append(toIndentedString(compoundClasses)).append("\n");
    sb.append("    supportingFeatureIds: ").append(toIndentedString(supportingFeatureIds)).append("\n");
    sb.append("    selectionCriterion: ").append(toIndentedString(selectionCriterion)).append("\n");
    sb.append("}");
    return sb.toString();
  }

  /**
   * Convert the given object to string with each line indented by 4 spaces
   * (except the first line).
   */
  private String toIndentedString(Object o) {
    if (o == null) {
      return "null";
    }
    return o.toString().replace("\n", "\n    ");
  }

}

